package gvo.rero;

public class MarcTag {
	public int nr=UNDEF;
	public String value;
	public int kind=UNDEF;
	public static final int UNDEF = 0;
	public static final int ISBN = 1;
	public static final int RERONR = 2;
	public static final int AUTOR = 3;
	public static final int TITEL = 4;
	public static final int ORTJAHR = 5;
	public static final int KOLLATION = 6;
	public static final int ANMERKUNG = 7;
	public static final int SCHLAGWORT = 8;
	public static final int ENTHALTENIN = 9;
	public static final int REIHE = 10;
	public static final int AUSGABE = 11;
	public String toString(){
		return "MT: Nr="+nr + " value=>"+value + "<" + " kind="+kind;
	}
	public void setKind(){
		if(nr==20){
			kind = ISBN;
			return;
		}
		if(nr==35){
			kind = RERONR;
			return;
		}
		if(nr>99 && nr<200){
			kind = AUTOR;
			return;
		}
		if(nr==245){
			kind = TITEL;
			return;
		}
		if(nr==250){
			kind = AUSGABE;
			return;
		}
		if(nr==260){
			kind = ORTJAHR;
			return;
		}
		if(nr==300){
			kind = KOLLATION;
			return;
		}
		if(nr>499 && nr<600){
			kind = ANMERKUNG;
			return;
		}
		if(nr>599 && nr<700){
			kind = SCHLAGWORT;
			return;
		}
		if(nr==700){
			kind = AUTOR;
			return;
		}
		// Zwar auch Autor, aber nur exotisch
		/*
		if(nr==710){
			kind = AUTOR;
			return;
		}
		*/
		if(nr>769 && nr<790){
			kind = ENTHALTENIN;
			return;
		}
		if(nr>799 && nr<840){
			kind = REIHE;
			return;
		}
	}
}
